﻿<%@ Page Language="C#" MasterPageFile="~/Enterprise/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="OrderAllProductList.aspx.cs" Inherits="HZ.DrugTrade.Web.Enterprise.OrderManage.OrderAllProductList"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li><a href="OrderConfirm.aspx">订单确认</a></li>
            <li class="active"><a href="OrderAllProductList.aspx">采购产品列表</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                产品名称：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtProductName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                采购医疗机构：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtHospitalName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                规格型号：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtOutLookc" runat="server"></asp:TextBox>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlStatus" runat="server">
                                    <asp:ListItem Text="未确认" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="已确认" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="拒绝配送" Value="3"></asp:ListItem>
                                    <asp:ListItem Text="全部" Value="4" Selected="True"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <asp:Literal runat="server" ID="ltlAdvance" Text="&lt;tbody id='advance' style='display:none'&gt;"></asp:Literal>
                        <tr>
                            <td align="right">
                                订单名称：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtDetailOrderName" runat="server"></asp:TextBox>
                            </td>
                           
                            <td align="right">
                                订单时间：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtStartDate" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    Width="62px"></asp:TextBox>
                                -<asp:TextBox ID="txtEndDate" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    Width="62px"></asp:TextBox>
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="100px">
                    <hz:HzButton ID="btnQuery" runat="server" Text="查询" CssClass="searchbtn" OnClick="btnQuery_Click" />
                    <hz:HzLinkButton ID="lbnSwitch" runat="server" CommandArgument="simple" Text="高级查询"
                        OnClick="lbnSwitch_Click"></hz:HzLinkButton>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwProduceCatalog" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="orderid,OrderDetailID" EmptyDataText="暂无符合条件的数据！" OnRowDataBound="gvwProduceCatalog_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this,'ctl00_ContentPlaceHolder1_gvwProduceCatalog','addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="checkbox1" id="checkbox1" value='<%#Eval("OrderDetailID")%>'
                        <%# (Eval("OrderDetailState").ToString() == "1") ? "" : "disabled='disabled'"%>
                        onclick="chkChecked(this,'ctl00_ContentPlaceHolder1_gvwProduceCatalog','addTable_chkAll');" />
                </ItemTemplate>
                <HeaderStyle Width="25px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购单">
                <ItemTemplate>
                    <a href='OrderConfirmDetail.aspx?orderID=<%# Eval("OrderID") %>'>
                        <asp:Label runat="server" ID="lblOrderName" Text='<%#(DataBinder.Eval(Container,"DataItem.OrderName")) %>'></asp:Label></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Price" HeaderText="采购价格" ReadOnly="true" DataFormatString="{0:N4}">
                <HeaderStyle Width="55px" />
            </asp:BoundField>
            <asp:BoundField DataField="PurchaseCount" HeaderText="采购总量" ReadOnly="true" />
            <asp:BoundField DataField="DisTributeCount" HeaderText="已配总量" ReadOnly="true" />
            <%--<asp:BoundField DataField="HospitalName" HeaderText="采购医疗机构" ReadOnly="true" />--%>
            <asp:TemplateField HeaderText="采购医疗机构">
                <ItemTemplate>
                    <a href="javascript:void(0)" title="查看医疗机构详细信息" onclick="window.open('../../CommonPage/HospitalInfo.aspx?hospitalId=<%# Eval("HospitalID") %>','selectCompany','width=550,height=350,resizable=0,scrollbars=0, status=0, toolbar=0, menubar=0')">
                        <%# Eval("HospitalName")%></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" ReadOnly="true" />
            <asp:BoundField DataField="MedicineModelName" HeaderText="剂型" ReadOnly="true" Visible="false" />
             <asp:BoundField DataField="Material" HeaderText="产品材质" NullDisplayText="无" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格型号" ReadOnly="true" />
            <asp:BoundField DataField="Factor" HeaderText="转换系数" ReadOnly="true" />
            <asp:BoundField DataField="Unit" HeaderText="单位" ReadOnly="true">
                <HeaderStyle Width="30px" />
            </asp:BoundField>
            <asp:BoundField DataField="CompanyName_SC" HeaderText="生产企业" ReadOnly="true" />
            <asp:BoundField Visible="false" DataField="startTime" HeaderText="订单起始时间" DataFormatString="{0:yyyy-MM-dd}"
                ReadOnly="true" />
            <asp:BoundField Visible="false" DataField="planEndTime" HeaderText="订单结束时间" DataFormatString="{0:yyyy-MM-dd}"
                ReadOnly="true" />
            <asp:TemplateField HeaderText="状态">
                <ItemTemplate>
                    <asp:Literal ID="ltrStatus" runat="server" Text='<%# Eval("OrderDetailState") %>'></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>提示:<span> 说明。</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnConfirm" runat="server" Text="确 认" ToolTip="确认配送" CssClass="btn"
            OnClick="btnConfirm_Click" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwProduceCatalog','请至少选定一个采购明细！'))" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <hz:HzButton ID="btnConfirm0" runat="server" Text="拒绝配送" ToolTip="拒绝配送" CssClass="btn"
            OnClick="btnConfirm0_Click" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwProduceCatalog','请至少选定一个采购明细！')) {return confirm('确定拒绝配送吗？');}return false;" />
    </div>
</asp:Content>
